mbr.bin: mbr.asm
	nasm -I include/ -o out/mbr.bin mbr.asm
	
loader.bin: loader.asm
	nasm -I include/ -o out/loader.bin loader.asm
	
os.raw: mbr.bin loader.bin
	qemu-img create -f raw target/os.raw 1440K
	dd if=out/mbr.bin of=target/os.raw bs=512 count=1
	dd if=out/loader.bin of=target/os.raw bs=512 count=4 seek=2
	
run:
	make install
	make only-run
	
only-run:
	qemu-system-i386 target/os.raw
	
install:
	make clean
	make -r os.raw
	
clean:
	del target /s/q
	del out /s/q